<?php 

namespace EmailDelivery\Templates;

use Users\Profile;
/**
 * Created by ITokarev
 * 
 * Тестовый Модуль с шаблоном почты
 */

class TestTemplateAction extends \Action
{
	protected static $layout = '#emailDelivery.templates.layout';
	
	protected function run()
	{	
		$profile = Profile::find($this->request->identity);
		$this->response->profileName = $profile->nickname;

		$this->response->set('title', 'Hi ' . $profile->nickname);
		// $this->response->set('from', '');
		$this->response->set('to', $profile->email);
	}
}